*******************************************************************************
*** Description: 	This document provides code for reproducing the figures	***
***					in Supplementary Material of the paper, "Elections		***
***					Increase Satisfaction with Democracy," which is			***
***					authored by Shane P. Singh and appears in Comparative	***
***					Political Studies. It also provides	code for 			***
***					reproducing statistics associated with claims made in	***
***					the text.				 								***
*******************************************************************************


**************
**************
*Set the Version                                                                                                                                 
**************
**************
version 17



**************
**************
*Install Required Packages                                                                                                                 
**************
**************
ssc install coefplot
ssc install eclplot
ssc install rddensity
ssc install yalescheme


********************************************************
********************************************************
********************************************************
*Section 1: Covariate Balance in Study 1
********************************************************
********************************************************
********************************************************



**************
**************
*Open the Study 1 Dataset
**************
**************
use "Study 1.dta", clear




**************
**************
*Figure SM1
**************
**************

*Put covariates on a 0-1 scale
sum age_harmonized 
gen age_01 = ((age - r(min))/(r(max) - r(min))) 
gen educ_level_01 = educ_harmonized_0_10/10
gen income_01 = income_harmonized_0_10/10


*limit sample to surveys that asked about income
tabulate survey_and_wave_and_cntry_year if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer", gen(sur_wav_ctry_year_dum)
gen income_miss = income_harmonized_0_10
replace income_miss = 0 if income_harmonized_0_10 == .
gen no_income = " "
foreach x of varlist sur_wav_ctry_year_dum* {
	sum income_miss if `x' == 1
	replace no_income  = "missing" if r(mean) == 0 & `x' == 1
	}
drop sur_wav_ctry_year_dum*  



*run the RD models
gen interv_on_or_after_elec_fem =  interv_on_or_after_elec //generate copy of binary interview date variable for graphing purposes
xtreg female_harmonized i.interv_on_or_after_elec_fem##c.time_from_elec if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  &  no_income  ~= "missing", i(country_and_year_num) fe
margins,  dydx(interv_on_or_after_elec_fem)  at(time_from_elec= (0))  post coeflegend level(95)
estimates store female

gen interv_on_or_after_elec_age =  interv_on_or_after_elec //generate copy of binary interview date variable for graphing purposes
xtreg age_01 i.interv_on_or_after_elec_age##c.time_from_elec if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  &  no_income  ~= "missing", i(country_and_year_num) fe
margins,  dydx(interv_on_or_after_elec_age)  at(time_from_elec= (0))  post coeflegend level(95)
estimates store age_01

gen interv_on_or_after_elec_edu =  interv_on_or_after_elec //generate copy of binary interview date variable for graphing purposes
xtreg educ_level_01 i.interv_on_or_after_elec_edu##c.time_from_elec if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  &  no_income  ~= "missing", i(country_and_year_num) fe
margins,  dydx(interv_on_or_after_elec_edu)  at(time_from_elec= (0))  post coeflegend level(95)
estimates store educ_level_01

gen interv_on_or_after_elec_inc =  interv_on_or_after_elec //generate copy of binary interview date variable for graphing purposes
xtreg income_01 i.interv_on_or_after_elec_inc##c.time_from_elec if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  &  no_income  ~= "missing", i(country_and_year_num) fe
margins,  dydx(interv_on_or_after_elec_inc)  at(time_from_elec= (0))  post coeflegend level(95)
estimates store income_01


*create a plot of the differences
graph set window fontface "LMRoman10-Regular" 

coefplot 	///
			(female,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(age_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(educ_level_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(income_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
		, scheme(yale)  title("") level(95)		///
		xline(0, lcolor(black*.8) lpattern(dash))  ylabel( , labsize(medsmall))  xlabel(-.15(.05).15, labsize(medsmall)) xscale(range(-.15 .15))  format(%9.2f) ///
		legend(off) ysize(4) xsize(10) scale(1.5) graphregion(color(white))	///
		xtitle("Estimated Ef`=uchar(14)'fect of Election" "on Mean Value of Covariate", size(medlarge)  margin(top))  ytitle("") 	///
		coeflabels(	1.interv_on_or_after_elec_fem  = 		"Female"   ///
					1.interv_on_or_after_elec_age  = 			"Age"   ///
					1.interv_on_or_after_elec_edu  = 			"Education Level"   ///
					1.interv_on_or_after_elec_inc  = 		"Income"   ///
					) 		
				
					
					
				


**************
**************
*Evidence for Claim Made in the Text: 
*There is evidence that women are less likely to be interviewed after the election (two-sided p-value = 0.038),
*though this difference is minute.	
**************		
**************					
xtreg female_harmonized i.interv_on_or_after_elec##c.time_from_elec if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  &  no_income  ~= "missing", i(country_and_year_num) fe





********************************************************
********************************************************
********************************************************
*Section 2: Distribution of Survey Interview Timing in Study 1
********************************************************
********************************************************
********************************************************


**************
**************
*Open the Study 1 Dataset
**************
**************
use "Study 1.dta", clear



**************
**************
*Figure SM2
**************
**************	
preserve 
graph set window fontface "LMRoman10-Regular" 

gen where = _n-351 in 1/751

kdensity time_from_elec if  interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" & age_harmonized ~=. & female_harmonized ~=. &  educ_harmonized_0_10 ~=. &  income_harmonized_0_10 ~=. & swd_same_direction_0_10 ~=., bw(4) at(where) gen(x d)

twoway  ///
	( ///
	area d where, ///
	color(black*.7) lwidth(none) ///
	) ///
		,	ytitle(Probability Density, size(medium)) ///
			xlabel(-350(175)350) xtitle("Days Between Election and Survey Interview", size(medium) margin(top)) ///
			ylabel(0(.01).02) ///
			xsize(10) ysize(8) ///
			scheme(yale) graphregion(color(white)) 
restore


**************
**************
*Evidence for Claim Made in the Text: 
*To more formally check for a discontinuity in the density of the observations at election day, I use
*the procedure of Cattaneo, Jansson, and Ma (2018). This tests the null hypothesis of continuity of
*the density functions for observations above and below the cutoff. The two-sided p-value associated
*with the null hypothesis is 0.185
**************
**************	
rddensity time_from_elec if interrupt_nat == 1 & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" & age_harmonized ~=. & female_harmonized ~=. &  educ_harmonized_0_10 ~=. &  income_harmonized_0_10 ~=. & swd_same_direction_0_10 ~=., c(0) kernel(uniform) 






********************************************************
********************************************************
********************************************************
*Section 3: Survey-Specific Effects in Study 1
********************************************************
********************************************************
********************************************************


**************
**************
*Open the Study 1 Dataset
**************
**************
use "Study 1.dta", clear



**************
**************
*Figure SM3
**************
**************	
*Note: while it depends on processing speed, this bootstrapping procedure will likely take several hours. On the author's machine, it took around 13.5 hours. 
set seed 123 //set the seed to ensure that the analysis replicates
reg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  
keep if e(sample)
forvalues iteration = 1(1)10000 {
preserve 
bsample, strata(svy_and_wv_and_cntry_year) 
mixed swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  || country_and_year_num: interv_on_or_after_elec time_from_elec   
 predict reffects*, reffects relevel(country_and_year_num)
keep if e(sample)
tabstat   reffects1  if e(sample), by(country_and_year_num) stats(mean)
tabulate country_and_year, gen(countryyeardummy)
forvalues i = 1(1)15 {
			tabstat  reffects1 if countryyeardummy`i'==1, stats(mean) save
			matrix RE = r(StatTotal)
			svmat RE, names(countryyeardummy_RE_`i')
         }
keep countryyeardummy_RE*
keep in 1
save "Bootstrap/REs_`iteration'.dta", replace
restore
}

preserve
use "Bootstrap/REs_1.dta", clear
forvalues iteration = 2(1)10000 {
append using "Bootstrap/REs_`iteration'.dta"
}
save "Bootstrap/REs_appended.dta", replace
restore


preserve
use "Bootstrap/REs_appended.dta", clear 
collapse   (mean)  countryyeardummy_RE* 
save "Bootstrap/REs_appended_means.dta", replace 
restore

preserve
use "Bootstrap/REs_appended.dta", clear 
foreach var of varlist countryyeardummy_RE_11-countryyeardummy_RE_151 {
			sort `var'
			replace `var' = . in 1/250 
			replace `var' = . in 9751/10000 
         }
save "Bootstrap/REs_appended_trimmed.dta", replace 
restore

preserve
use "Bootstrap/REs_appended_trimmed.dta", clear 
collapse   (min)  countryyeardummy_RE* 
save "Bootstrap/REs_appended_mins.dta", replace 
restore

preserve
use "Bootstrap/REs_appended_trimmed.dta", clear 
collapse   (max)  countryyeardummy_RE* 
save "Bootstrap/REs_appended_maxs.dta", replace 
restore


preserve
use "Bootstrap/REs_appended_means.dta", clear
append using "Bootstrap/REs_appended_mins.dta"
append using "Bootstrap/REs_appended_maxs.dta"
save "Bootstrap/REs_appended_mean_min_max.dta", replace 
restore 


mixed swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  || country_and_year_num: interv_on_or_after_elec time_from_elec  
matrix B = e(b)
global effect = B[1,2]


preserve
use "Bootstrap/REs_appended_mean_min_max.dta", clear
foreach var of varlist countryyeardummy_RE_11-countryyeardummy_RE_151 {
			replace `var' =  `var' + $effect
         }
save "Bootstrap/effects_plus_REs.dta", replace 
restore


preserve
use "Bootstrap/effects_plus_REs.dta", clear 
gen i = _n
reshape long  countryyeardummy_RE_, i(i) j(cntryyear) 
sort cntryyear
rename i type
tostring type, replace 
replace type = "mean" if type == "1"
replace type = "min" if type == "2"
replace type = "max" if type == "3"
seq i, f(1) t(16) b(3) 
reshape wide countryyeardummy_RE_,  i(cntryyear) j(type) string
gen mean_middle = (countryyeardummy_RE_min + countryyeardummy_RE_max)/2 
save "Bootstrap/effects_plus_REs_reshape.dta", replace 


sort cntryyear
egen order = rank(cntryyear)

labmask order, val(cntryyear)
tab order

graph set window fontface "LMRoman10-Regular" 

eclplot  mean_middle countryyeardummy_RE_min countryyeardummy_RE_max  order   ///
	, estopts(mcolor(black) msize(medium)) ///
	  rplottype(rspike) ciopts(lpattern(solid) lcolor(black)) ///
	  horiz scheme(yale)  ysize(6) scale(.95) ylabel(1(1)16) 	///
	  xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	  legend(off) graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	xlabel(-1(0.5)1, labsize(small) format(%9.1f))  xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election on" "Satisfaction with Democracy", size(medsmall) margin(top)) ///
	  ytitle("") ylabel( ///
	1 	`" "Croatia"   "(2011)" "' /// 
	2	`" "Greece"   "(1989)" "' ///
	3	`" "Greece"   "(2004)" "' ///
	4	`" "Greece"   "(2009)" "' ///
	5	`" "Ireland"   "(2007)" "' ///
	6	`" "Italy"   "(1992)" "' ///
	7	`" "Netherlands"   "(2006)" "' ///
	8	`" "Netherlands"   "(2012)" "' ///
	9	`" "Portugal"   "(2004)" "' ///
	10	`" "Portugal"   "(2014)" "' ///
	11	`" "Portugal"   "(2018)" "' ///
	12	`" "Spain"   "(1989)" "' ///
	13	`" "Spain"   "(2004)" "' ///
	14	`" "Sweden"   "(2014)" "' ///
	15	`" "Sweden"   "(2018)" "' ///
	  , grid labsize(small))


restore



********************************************************
********************************************************
********************************************************
*Section 4: The Consequences of Changing the Bandwidth of Included Survey Interview Dates in Study 1
********************************************************
********************************************************
********************************************************


**************
**************
*Open the Study 1 Dataset
**************
**************
use "Study 1.dta", clear



**************
**************
*Figure SM4
**************
**************	
postfile bandwidth bandwidth_size b se n_obs using "bandwidth.dta", replace

forvalues days_counter = 35(2.8)315 {	
xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if abs(time_from_elec) <= `days_counter' & interrupt_nat == 1 & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer", i(country_and_year_num) fe

	scalar b = _b[1.interv_on_or_after_elec]
	scalar se = _se[1.interv_on_or_after_elec]
	scalar n_obs = e(N)
	scalar bandwidth_size = `days_counter'
	
	post bandwidth (bandwidth_size) (b) (se) (n_obs)
}

postclose bandwidth


preserve

use "bandwidth.dta", clear
gen b_high = b + 1.96*se 
gen b_low = b - 1.96*se


graph set window fontface "LMRoman10-Regular" 

twoway (line b bandwidth_size, lcolor(black) yscale(range(-.125 .31))) ///
	(line b_high bandwidth_size, lpattern(solid) lcolor(gs11) lwidth(thin)) ///
	(line b_low bandwidth_size, lpattern(solid) lcolor(gs11) lwidth(thin)) ///
	(spike n_obs bandwidth_size, yaxis(2) lcolor(black) lwidth(thin)),  ///
	xlabel(0(50)350, labsize(small))  legend(off) title() ///
	ylabel(-.05(.1).35, labsize(small) format(%9.2f))   ///
	yscale(range(0 200000) axis(2)) ylabel(0(10000)20000, labsize(vsmall) axis(2)) yline(0, lcolor(gs1) lpattern(dash)) ytitle("Number of Observations                                                                                       ", size(vsmall) axis(2)) ///
	xtitle("Bandwidth", size(small) margin(top)) ytitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small)) graphregion(color(white)) ///
	scheme(yale) ysize(8) xsize(9)   graphregion(color(white)) scale(1.075)	 
	
restore






********************************************************
********************************************************
********************************************************
*Section 5: The Effects of Placebo Elections on Satisfaction with Democracy in Study 1
********************************************************
********************************************************
********************************************************


**************
**************
*Open the Study 1 Dataset
**************
**************
use "Study 1.dta", clear




**************
**************
*Figure SM5
**************
**************	
foreach num of numlist 0(1)25 {
		gen time_fr_elec_nat_all_plcbo_mns`num' = interview_date-date_nat - `num'
		replace time_fr_elec_nat_all_plcbo_mns`num' = . if interview_date == .
		gen interv_on_or_after_nat_mns`num' = 0
		replace interv_on_or_after_nat_mns`num' = 1 if time_fr_elec_nat_all_plcbo_mns`num' >=0
		replace interv_on_or_after_nat_mns`num' = . if time_fr_elec_nat_all_plcbo_mns`num' == .
         }


foreach num of numlist 0(1)25 {
		gen time_fr_elec_nat_all_plcbo_pls`num' = interview_date-date_nat + `num'
		replace time_fr_elec_nat_all_plcbo_pls`num' = . if interview_date == .
		gen interv_on_or_after_nat_pls`num' = 0
		replace interv_on_or_after_nat_pls`num' = 1 if time_fr_elec_nat_all_plcbo_pls`num' >=0
		replace interv_on_or_after_nat_pls`num' = . if time_fr_elec_nat_all_plcbo_pls`num' == .
         }



cd "/Users/singh/Desktop"
postfile placebo placebo_number b se n_obs using "placebo_mns.dta", replace


foreach num of numlist 0{	
xtreg swd_same_direction_0_10 interv_on_or_after_nat_mns`num'##c.time_fr_elec_nat_all_plcbo_mns`num'  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe //*limiting sample to main model

	scalar b = _b[1.interv_on_or_after_nat_mns`num']
	scalar se = _se[1.interv_on_or_after_nat_mns`num']
	scalar n_obs = e(N)
	scalar placebo_number = `num'
	
	post placebo (placebo_number) (b) (se) (n_obs)
}

foreach num of numlist 1(1)25{	
xtreg swd_same_direction_0_10 interv_on_or_after_nat_mns`num'##c.time_fr_elec_nat_all_plcbo_mns`num'  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  & time_from_elec>0, i(country_and_year_num) fe //*limiting sample to post-true-election observations

	scalar b = _b[1.interv_on_or_after_nat_mns`num']
	scalar se = _se[1.interv_on_or_after_nat_mns`num']
	scalar n_obs = e(N)
	scalar placebo_number = `num'
	
	post placebo (placebo_number) (b) (se) (n_obs)
}

postclose placebo




cd "/Users/singh/Desktop"
postfile placebo placebo_number b se n_obs using "placebo_pls.dta", replace

foreach num of numlist 1(1)25{	
xtreg swd_same_direction_0_10 interv_on_or_after_nat_pls`num'##c.time_fr_elec_nat_all_plcbo_pls`num'  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer"  & time_from_elec<0, i(country_and_year_num) fe //*limiting sample to pre-true-election observations

	scalar b = _b[1.interv_on_or_after_nat_pls`num']
	scalar se = _se[1.interv_on_or_after_nat_pls`num']
	scalar n_obs = e(N)
	scalar placebo_number = `num'
	
	post placebo (placebo_number) (b) (se) (n_obs)
}

postclose placebo



preserve

use "placebo_pls.dta", clear
replace placebo_number = - placebo_number //*make the negative placebo dates negative
append using "placebo_mns.dta"
sort placebo_number

gen b_high = b + 1.96*se 
gen b_low = b - 1.96*se


keep if ///
	placebo_number == -5 | ///
	placebo_number == -10  | ///
	placebo_number == -15  | ///
	placebo_number == -20  | ///
	placebo_number == -25  | ///
	placebo_number == 0  | ///
	placebo_number == 5  | ///
	placebo_number == 10  | ///
	placebo_number == 15  | ///
	placebo_number == 20  | ///
	placebo_number == 25


graph set window fontface "LMRoman10-Regular" 



twoway  ///
	(scatter b placebo_number if placebo_number == 0, mcolor(black) yscale(range(-.1 .31))) ///
	(rspike  b_low b_high placebo_number  if placebo_number == 0, lpattern(solid) lcolor(black))  ///
	(scatter b placebo_number if placebo_number ~= 0, mcolor(gs11) yscale(range(-.1 .31))) ///
	(rspike  b_low b_high placebo_number  if placebo_number ~= 0, lpattern(solid) lcolor(gs11) lwidth(thin)) ///
	, xlabel(-25(5)25, labsize(vsmall))  legend(off) title() ///
	ylabel(-.50(.25).50, labsize(vsmall) format(%9.2f))   ///
	yline(0, lcolor(gs1) lpattern(dash)) ///
	xtitle("Number of Days Placebo Election is From True Election", size(small) margin(top)) ytitle("Estimated Ef`=uchar(14)'fect of Real and Placebo Elections on" "Satisfaction with Democracy", size(small)) graphregion(color(white)) ///
	scheme(yale) xsize(6) ysize(5)  graphregion(color(white)) scale(1.25)	


restore
	
drop time_fr_elec_nat_all_plcbo_mns0-interv_on_or_after_nat_pls25





********************************************************
********************************************************
********************************************************
*Section 6: Survey-Specific Effects in Study 2
********************************************************
********************************************************
********************************************************



**************
**************
*Open the Study 2 Dataset
**************
**************
use "Study 2.dta", clear




**************
**************
*Figure SM6
**************
**************	
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 i.countryandyear_num  if voted_early~= .,
tab countryandyear if e(sample)
tab countryandyear_num if e(sample), nol
margins, at(countryandyear_num = ( ///
3	///	
4	///	
5	///	
14	///	
18	///	
20	///	
24	///	
26	///	
)) post 
est store overall_by_elec


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(overall_by_elec, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal ///
	coeflabels(	1._at  = 	`" "British Columbia"   "(2015)" "'  ///
				2._at  = 	`" "Ontario"   "(2015)" "'  ///
				3._at  = 	`" "Quebec"   "(2015)" "'  ///
				4._at  = 	`" "Lower Saxony"   "(2013)" "'  ///
				5._at  = 	`" "Catalonia"   "(2011)" "'  ///
				6._at  = 	`" "Madrid"   "(2011)" "'  ///
				7._at  = 	`" "Lucerne"   "(2011)" "'  ///
				8._at  = 	`" "Zurich"   "(2011) " "'  ///	
										) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(5) xsize(5) scale(1.2) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) 


	

********************************************************
********************************************************
********************************************************
*Section 7: Accounting for Attrition in Study 2
********************************************************
********************************************************
********************************************************


**************
**************
*Open the Study 2 Dataset
**************
**************
use "Study 2.dta", clear



**************
**************
*Evidence for Claim Made in the Text: 
*Of those who completed a wave 1 interview in the Making Electoral Democracy Work surveys I
*analyze, around 80 percent completed a post-election interview in wave 2. 
**************
**************	
sum retained if countryandyear ==  ///
             "Canada 2015 (BC National)" | countryandyear ==   ///
         "Canada 2015 (Ontario National)" | countryandyear ==   ///
          "Canada 2015 (Quebec National)" | countryandyear ==   ///
   "Germany 2013 (Lower Saxony National)" | countryandyear ==   ///
        "Spain 2011 (Catalonia National)" | countryandyear ==   ///
           "Spain 2011 (Madrid National)" | countryandyear ==   ///
    "Switzerland 2011 (Lucerne National)" | countryandyear ==   ///
     "Switzerland 2011 (Zurich National)" 

	 
	 
**************
**************
*Create Inverse Probability Weights
**************
**************
xtlogit retained age_10 female educ_scale_0_10 income_harmonized_0_10 if countryandyear ==  ///
             "Canada 2015 (BC National)" | countryandyear ==   ///
         "Canada 2015 (Ontario National)" | countryandyear ==   ///
          "Canada 2015 (Quebec National)" | countryandyear ==   ///
   "Germany 2013 (Lower Saxony National)" | countryandyear ==   ///
        "Spain 2011 (Catalonia National)" | countryandyear ==   ///
           "Spain 2011 (Madrid National)" | countryandyear ==   ///
    "Switzerland 2011 (Lucerne National)" | countryandyear ==   ///
     "Switzerland 2011 (Zurich National)" ///
	 , i(countryandyear_num) fe

predict retained_respondent, pu0 

gen weight = 1/retained_respondent



**************
**************
*Figure SM7
**************
**************
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 if voted_early~=. [pw = weight], cl(countryandyear)
margins, post 
est store overall

reg sat_dem_nat_change i.voted_early age_10 female educ_scale_0_10 income_harmonized_0_10  [pw = weight], cl(countryandyear)
margins, at(voted_early = (0 1)) post 
est store not_early_early

graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(overall, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
		(not_early_early, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal ///
		order(_cons 1._at 2._at) ///
	coeflabels( _cons  	= 						`" "Main" "Model"  "'  ///
				1._at  	= 						`" "Not an Early" "Voter"  "'  ///
				2._at 	= 						`" "Early" "Voter"  "'  ///
										) ///
	graphregion(margin(small)) /// 
	legend(off) ///
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(1.95) xsize(4) scale(2.5) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) 

	

**************
**************
*Figure SM8
**************
**************
reg sat_dem_nat_change i.winner_early_voting age_10 female educ_scale_0_10 income_harmonized_0_10 if voted_early==1  & winner_early_voting ~= 1 [pw = weight], cl(countryandyear)
margins, at(winner_early_voting = (2 3)) post 
est store winner_early_voting

graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(winner_early_voting, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal ///
		order(_cons 1._at 2._at) ///
	coeflabels( 1._at  	= 						`" "Winner" "(Pre-Election Vote)"  "'   ///
				2._at 	= 						`" "Loser" "(Pre-Election Vote)"  "' ///
									) ///
	graphregion(margin(small)) /// 
	legend(off) ///
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall))
	
	
**************
**************
*Figure SM9
**************
**************
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 i.countryandyear_num  if voted_early~= . [pw = weight],
tab countryandyear if e(sample), nol
tab countryandyear_num if e(sample), nol
margins, at(countryandyear_num = ( ///
3	///	
4	///	
5	///	
14	///	
18	///	
20	///	
24	///	
26	///	
)) post 
est store overall_by_elec


graph set window fontface "LMRoman10-Regular"

coefplot ///
		(overall_by_elec, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal ///
	coeflabels(	1._at  = 	`" "British Columbia"   "(2015)" "'  ///
				2._at  = 	`" "Ontario"   "(2015)" "'  ///
				3._at  = 	`" "Quebec"   "(2015)" "'  ///
				4._at  = 	`" "Lower Saxony"   "(2013)" "'  ///
				5._at  = 	`" "Catalonia"   "(2011)" "'  ///
				6._at  = 	`" "Madrid"   "(2011)" "'  ///
				7._at  = 	`" "Lucerne"   "(2011)" "'  ///
				8._at  = 	`" "Zurich"   "(2011) " "'  ///	
										) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(5) xsize(5) scale(1.2) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall))
	
	




********************************************************
********************************************************
********************************************************
*Section 8: Accounting for Wave 1 Survey Date in Study 2
********************************************************
********************************************************
********************************************************



**************
**************
*Open the Study 2 Dataset
**************
**************
use "Study 2.dta", clear



**************
**************
*Figure SM10
**************
**************
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 days_until_election if voted_early~=. , cl(countryandyear)
margins, post 
est store overall

reg sat_dem_nat_change i.voted_early age_10 female educ_scale_0_10 income_harmonized_0_10 days_until_election, cl(countryandyear)
margins, at(voted_early = (0 1)) post 
est store not_early_early

graph set window fontface "LMRoman10-Regular"

coefplot ///
		(overall, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
		(not_early_early, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal ///
		order(_cons 1._at 2._at) ///
	coeflabels( _cons  	= 						`" "Main" "Model"  "'  ///
				1._at  	= 						`" "Not an Early" "Voter"  "'  ///
				2._at 	= 						`" "Early" "Voter"  "'  ///
										) ///
	graphregion(margin(small)) /// 
	legend(off) ///
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(1.95) xsize(4) scale(2.5) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall))
	
	
	
**************
**************
*Figure SM11
**************
**************
reg sat_dem_nat_change i.winner_early_voting age_10 female educ_scale_0_10 income_harmonized_0_10 days_until_election if voted_early==1  & winner_early_voting ~= 1, cl(countryandyear)
margins, at(winner_early_voting = (2 3)) post 
est store winner_early_voting

graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(winner_early_voting, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal ///
		order(_cons 1._at 2._at) ///
	coeflabels( 1._at  	= 						`" "Winner" "(Pre-Election Vote)"  "'   ///
				2._at 	= 						`" "Loser" "(Pre-Election Vote)"  "' ///
									) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall))


**************
**************
*Figure SM12
**************
**************
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 days_until_election i.countryandyear_num  if voted_early~= .
tab countryandyear if e(sample), nol
tab countryandyear_num if e(sample), nol
margins, at(countryandyear_num = ( ///
3	///	
4	///	
5	///	
14	///	
18	///	
20	///	
24	///	
26	///	
)) post 
est store overall_by_elec



graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(overall_by_elec, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal ///
	coeflabels(	1._at  = 	`" "British Columbia"   "(2015)" "'  ///
				2._at  = 	`" "Ontario"   "(2015)" "'  ///
				3._at  = 	`" "Quebec"   "(2015)" "'  ///
				4._at  = 	`" "Lower Saxony"   "(2013)" "'  ///
				5._at  = 	`" "Catalonia"   "(2011)" "'  ///
				6._at  = 	`" "Madrid"   "(2011)" "'  ///
				7._at  = 	`" "Lucerne"   "(2011)" "'  ///
				8._at  = 	`" "Zurich"   "(2011) " "'  ///	
										) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(5) xsize(5) scale(1.2) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) 




	
********************************************************
********************************************************
********************************************************
*Section 9: Conditional Effects in Studies 1, 2, and 3
********************************************************
********************************************************
********************************************************


***************************
***************************
***************************
*Section 9.1: Study 1
***************************
***************************
***************************



**************
**************
*Open the Study 1 Dataset
**************
**************
use "Study 1.dta", clear




**************
**************
*Figure SM13
**************
**************	

*gender
xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##i.female_harmonized  age_harmonized  educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
margins,  dydx(interv_on_or_after_elec)  at(time_from_elec= (0) female_harmonized = (0 1)) post coeflegend   level(95)
est store interrupt_nat_female



graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(interrupt_nat_female, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "Male" "Gender ID"  "'  ///
				2._at  	= 												`" "Female" "Gender ID"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(gender, replace)


*age
xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##c.age_harmonized i.female_harmonized    educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
sum age if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins,  dydx(interv_on_or_after_elec)  at(time_from_elec= (0) age_harmonized = ($p25 $p75)) post coeflegend   level(95)
est store interrupt_nat_age

graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(interrupt_nat_age, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Age"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Age"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(age, replace)


*education
xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##c.educ_harmonized_0_10 i.female_harmonized  age_harmonized   income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
sum educ_harmonized_0_10 if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins,  dydx(interv_on_or_after_elec)  at(time_from_elec= (0) educ_harmonized_0_10 = ($p25 $p75)) post coeflegend   level(95)
est store interrupt_nat_educ

graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(interrupt_nat_educ, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Education"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Education"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(educ, replace)


*income
xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##c.income_harmonized_0_10 i.female_harmonized  age_harmonized  educ_harmonized_0_10  if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
sum income_harmonized_0_10 if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins,  dydx(interv_on_or_after_elec)  at(time_from_elec= (0) income_harmonized_0_10 = ($p25 $p75)) post coeflegend   level(95)
est store interrupt_nat_income


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(interrupt_nat_income, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Income"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Income"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(income, replace)

	
	
*combined graph
graph set window fontface "LMRoman10-Regular" 

graph combine ///
		gender age educ income ///
	, 	graphregion(margin(zero) color(white))  rows(2)  ysize(2.9) xsize(7.5) scale(.75) imargin(1 1 1 1) 

gr_edit  .plotregion1.graph2.xaxis1.title.text = {}
gr_edit  .plotregion1.graph2.xaxis1.title.text.Arrpush `" "'

gr_edit  .plotregion1.graph1.xaxis1.title.text = {}
gr_edit  .plotregion1.graph1.xaxis1.title.text.Arrpush `" "'

gr_edit  .plotregion1.graph1.yaxis1.edit_tick 1 1 `" "Male" "      Gender ID" "', tickset(major)



**************
**************
*Evidence for Claim Made in the Text: 
*The two-sided p-value associated with the conditioning influence of each covariate is:
*0.229 (gender); 0.347 (age); 0.383 (education); and 0.404 (income)
**************
**************	
xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##i.female_harmonized  age_harmonized  educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
mat results = r(table)
mat list results
display results[4, 11]


xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##c.age_harmonized i.female_harmonized    educ_harmonized_0_10 income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
mat results = r(table)
mat list results
display results[4, 8]


xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##c.educ_harmonized_0_10 i.female_harmonized  age_harmonized   income_harmonized_0_10 if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
mat results = r(table)
mat list results
display results[4, 8]


xtreg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec##c.income_harmonized_0_10 i.female_harmonized  age_harmonized  educ_harmonized_0_10  if interrupt_nat == 1  & source ~= "WVS_EVS" & source ~= "AmericasBarometer" & source ~= "Latinobarometer" , i(country_and_year_num) fe
mat results = r(table)
mat list results
display results[4, 8]



***************************
***************************
***************************
*Section 9.2: Study 2
***************************
***************************
***************************



**************
**************
*Open the Study 2 Dataset
**************
**************
use "Study 2.dta", clear



**************
**************
*Figure SM14
**************
**************	

*gender
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 if voted_early~=., cl(countryandyear)
margins, at(female = (0 1)) post coefleg level(95)
est store pre_to_post_female


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(pre_to_post_female, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "Male" "Gender ID"  "'  ///
				2._at  	= 												`" "Female" "Gender ID"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(gender, replace)


*age
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 if voted_early~=., cl(countryandyear)
sum age_10 if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins, at(age_10 = ($p25 $p75)) post coefleg level(95)
est store pre_to_post_age


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(pre_to_post_age, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Age"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Age"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(age, replace)


*education
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 if voted_early~=., cl(countryandyear)
sum educ_scale_0_10 if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins, at(educ_scale_0_10 = ($p25 $p75)) post coefleg level(95)
est store pre_to_post_educ


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(pre_to_post_educ, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Education"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Education"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(educ, replace)


	
*income
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 if voted_early~=., cl(countryandyear)
sum income_harmonized_0_10 if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins, at(income_harmonized_0_10 = ($p25 $p75)) post coefleg level(95)
est store pre_to_post_income



graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(pre_to_post_income, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Income"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Income"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Elections on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(income, replace)

	
	
*combined graph
graph set window fontface "LMRoman10-Regular" 

graph combine ///
		gender age educ income ///
	, 	graphregion(margin(zero) color(white))  rows(2)  ysize(2.9) xsize(7.5) scale(.75) imargin(1 1 1 1) ///
		saving("/Users/singh/Dropbox/Apps/Overleaf/Elections and Satisfaction With Democracy/figures/SWD_pre_to_post_reg_conditional.gph", replace)

gr_edit  .plotregion1.graph2.xaxis1.title.text = {}
gr_edit  .plotregion1.graph2.xaxis1.title.text.Arrpush `" "'

gr_edit  .plotregion1.graph1.xaxis1.title.text = {}
gr_edit  .plotregion1.graph1.xaxis1.title.text.Arrpush `" "'

gr_edit  .plotregion1.graph1.yaxis1.edit_tick 1 1 `" "Male" "      Gender ID" "', tickset(major)



**************
**************
*Evidence for Claim Made in the Text: 
*The two-sided p-value associated with the conditioning influence of
*each covariate is: 0.147 (gender); 0.027 (age); 0.061 (education); and 0.076 (income).
**************
**************	
reg sat_dem_nat_change age_10 female educ_scale_0_10 income_harmonized_0_10 if voted_early~=., cl(countryandyear)
mat results = r(table)
mat list results
display results[4, 2]
display results[4, 1]
display results[4, 3]
display results[4, 4]





***************************
***************************
***************************
*Section 9.3: Study 3
***************************
***************************
***************************



**************
**************
*Open the Study 3 Dataset
**************
**************
use "Study 3.dta", clear



**************
**************
*Figure SM15
**************
**************	

*gender
reg sat_dem_post i.election_2023##i.gender_cat age income education_level  if  turnout_propensity_pre ~=.
margins, dydx(election_2023) at(gender_cat = (1 2)) post coefleg level(90)
est store ITT_female


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(ITT_female, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "Male" "Gender ID"  "'  ///
				2._at  	= 												`" "Female" "Gender ID"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election Vignette on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(90)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(gender, replace)


*age
reg sat_dem_post i.election_2023##c.age income education_level i.gender_cat if  turnout_propensity_pre ~=.
sum age if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins, dydx(election_2023) at(age = ($p25 $p75)) post coefleg level(90)
est store ITT_age


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(ITT_age, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Age"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Age"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election Vignette on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(90)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(age, replace)


*education
reg sat_dem_post i.election_2023##c.education_level age income i.gender_cat if  turnout_propensity_pre ~=.
sum education_level if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins, dydx(election_2023) at(education_level = ($p25 $p75)) post coefleg level(90)
est store ITT_educ


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(ITT_educ, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Education"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Education"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election Vignette on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(90)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(educ, replace)


	
*income
reg sat_dem_post i.election_2023##c.income age  education_level i.gender_cat if  turnout_propensity_pre ~=.
sum income if e(sample), detail
global p25 = r(p25)
global p75 = r(p75)
margins, dydx(election_2023) at(income = ($p25 $p75)) post coefleg level(90)
est store ITT_income



graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(ITT_income, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1._at  	= 												`" "25th Percentile" "of Income"  "'  ///
				2._at  	= 												`" "75th Percentile" "of Income"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-1(0.5)1, labsize(vsmall)) xscale(range(-1.1 1.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election Vignette on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(90)  format(%9.1f) ysize(1.55) xsize(4) scale(3.05) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) ///
	name(income, replace)

	
	
*combined graph
graph set window fontface "LMRoman10-Regular" 

graph combine ///
		gender age educ income ///
	, 	graphregion(margin(zero) color(white))  rows(2)  ysize(2.9) xsize(7.5) scale(.75) imargin(1 1 1 1) ///
		saving("/Users/singh/Dropbox/Apps/Overleaf/Elections and Satisfaction With Democracy/figures/Finland_ITT_conditional.gph", replace)

gr_edit  .plotregion1.graph2.xaxis1.title.text = {}
gr_edit  .plotregion1.graph2.xaxis1.title.text.Arrpush `" "'

gr_edit  .plotregion1.graph1.xaxis1.title.text = {}
gr_edit  .plotregion1.graph1.xaxis1.title.text.Arrpush `" "'

gr_edit  .plotregion1.graph1.yaxis1.edit_tick 1 1 `" "Male" "      Gender ID" "', tickset(major)




**************
**************
*Evidence for Claim Made in the Text: 
*The two-sided p-value associated with the conditioning influence of each covariate is: 
*0.510 (gender); 0.801 (age); 0.287 (education); and 0.514 (income)
**************
**************	
reg sat_dem_post i.election_2023##i.gender_cat age income education_level  if  turnout_propensity_pre ~=.
mat results = r(table)
mat list results
display results[4, 10]


reg sat_dem_post i.election_2023##c.age income education_level i.gender_cat if  turnout_propensity_pre ~=.
mat results = r(table)
mat list results
display results[4, 5]


reg sat_dem_post i.election_2023##c.education_level age income i.gender_cat if  turnout_propensity_pre ~=.
mat results = r(table)
mat list results
display results[4, 5]


reg sat_dem_post i.election_2023##c.income age  education_level i.gender_cat if  turnout_propensity_pre ~=.
mat results = r(table)
mat list results
display results[4, 5]





********************************************************
********************************************************
********************************************************
*Section 10: Probing Scope Conditions
********************************************************
********************************************************
********************************************************


***************************
***************************
***************************
*Section 10.1: An Analysis Leveraging a Controversial Election Using the Design of Study 1
***************************
***************************
***************************



**************
**************
*Open the Study 1 Dataset
**************
**************
use "Study 1.dta", clear



**************
**************
*Figure SM16
**************
**************
gen interv_on_or_after_elec_CR = interv_on_or_after_elec //generate copy of binary interview date variable for graphing purposes
reg swd_same_direction_0_10 i.interv_on_or_after_elec_CR##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if   survey_and_wave_and_cntry_year == "AmericasBarometer_2010_Costa Rica_2010"
margins, dydx(interv_on_or_after_elec_CR) at(time_from_elec=0) post coeflegend level(95)
est store interv_on_or_after_elec_CR

gen interv_on_or_after_elec_VE = interv_on_or_after_elec //generate copy of binary interview date variable for graphing purposes
reg swd_same_direction_0_10 i.interv_on_or_after_elec_VE##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if   survey_and_wave_and_cntry_year == "Latinobarometer_2010_Venezuela_2010"
margins, dydx(interv_on_or_after_elec_VE) at(time_from_elec=0) post coeflegend level(95)
est store interv_on_or_after_elec_VE

graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(interv_on_or_after_elec_CR, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
		(interv_on_or_after_elec_VE, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1.interv_on_or_after_elec_CR  	= 						`" "Costa Rica"   "(2010)" "' ///  ///
				1.interv_on_or_after_elec_VE  	= 						`" "Veneuzela"   "(2010)" "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-2(.5)2, labsize(vsmall)) xscale(range(-2.1 2.1)) xtitle("Estimated Ef`=uchar(14)'fect of Election on" "Satisfaction with Democracy", size(small) margin(top)) ///
	ylabel(, labsize(vsmall))  ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(95) format(%9.1f) ysize(1.5) xsize(7.5) scale(4) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) 



**************
**************
*Evidence for Claim Made in the Text: 
*...Costa Rica's election had a positive 0.69-unit impact on SWD, though this estimate misses conventional levels
*of statistical significance (two-sided p-value = 0.188).
**************
**************	
reg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if   survey_and_wave_and_cntry_year == "AmericasBarometer_2010_Costa Rica_2010"
margins, dydx(interv_on_or_after_elec) at(time_from_elec=0) level(95)



**************
**************
*Evidence for Claim Made in the Text: 
*The effect of Venezuela's controversial election on SWD is effectively zero (two-sided p-value = 0.989). 
**************
**************	
reg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if   survey_and_wave_and_cntry_year == "Latinobarometer_2010_Venezuela_2010"
margins, dydx(interv_on_or_after_elec) at(time_from_elec=0) level(95)



**************
**************
*Evidence for Claim Made in the Text: 
*Moreover, while the number of respondents in the Venezuelan analysis is above 1,000, 
*only 20 individuals in the sample were interviewed on or after election day.
**************
**************	
reg swd_same_direction_0_10 i.interv_on_or_after_elec##c.time_from_elec  age_harmonized female_harmonized educ_harmonized_0_10 income_harmonized_0_10 if   survey_and_wave_and_cntry_year == "Latinobarometer_2010_Venezuela_2010"
tab interv_on_or_after_elec if e(sample)





***************************
***************************
***************************
*Section 10.2: An Analysis Leveraging a Controversial Election Using the Design of Study 3
***************************
***************************
***************************



**************
**************
*Open the Brazil Experiment Dataset
**************
**************
use "Brazil_Experiment.dta", clear




**************
**************
*Evidence for Claim Made in the Text: 
*Assuming a small effect size (Cohen's d = 0.2), 310 observations per experimental group
*are needed to detect an effect at the ten percent significance level with 80 percent power. 
**************
**************	
power twomeans 0 .2, alpha(.1) power(.8)



**************
**************
*Evidence for Claim Made in the Text: 
*[There are] 374 usable observations in the treatment group and 367
*in the control condition. 
**************
**************	
tab election_2022 if sat_dem_post ~=. & age ~=. & income ~=. & education_years ~=. & gender_cat ~=. & turnout_propensity_pre ~=. 



**************
**************
*Evidence for Claim Made in the Text: 
*92.2 percent of treated respondents correctly answered [a factual manipulation check].
**************	
**************
tab FMC_TR_passed election_2022, column


**************
**************
*Evidence for Claim Made in the Text: 
*In the  control group, 56.4 percent of respondents correctly answered an inquiry 
*about the content of the grass vignette.
**************	
**************
tab FMC_TR_passed election_2022, column



**************
**************
*Figure SM17
**************
**************
reg sat_dem_post i.election_2022 i.gender age_10 income education_years if  turnout_propensity_pre~=.
margins, dydx(election_2022) post  level(90)
est store election_2022


reg sat_dem_post i.election_2022##i.turnout_propensity_pre i.gender age_10 income education_years
margins, dydx(election_2022) at(turnout_propensity_pre = (1 4)) post  level(90)
est store election_2022_turnout


graph set window fontface "LMRoman10-Regular" 

coefplot ///
		(election_2022, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
		(election_2022_turnout, offset(0) recast(scatter) mcolor(black) msize(medium) ciopts(lpattern(solid) lcolor(black))) ///
	,  scheme(yale) horizontal 	///
	coeflabels( 1.election_2022  	= 						`" "Main" "Model"  "'  ///
				1._at  	= 												`" "Not a Prior" "Voter"  "'  ///
				2._at  	= 												`" "Habitual" "Voter"  "'  ///
				) ///
	legend(off) ///
	graphregion(margin(small)) /// 
	xlabel(-4(1)4, labsize(vsmall)) xscale(range(-4.5 4.5)) xtitle("Estimated Ef`=uchar(14)'fect of Election Vignette on" "Satisfaction with Democracy", size(small) margin(top)) ///
	xline(0,   lcolor(gs10) lwidth(thin) lpattern(solid)) ///
	level(90) format(%9.1f) ysize(2) xsize(7.5) scale(3.25) ///
	graphregion(color(white) lcolor(black) lwidth(thick) margin(medsmall)) 

	
**************
**************
*Evidence for Claim Made in the Text: 
*... there is a precisely estimated 0.51-unit negative impact of the election 
*treatment on satisfaction (two-sided p-value = 0.019).
**************	
**************	
reg sat_dem_post i.election_2022 i.gender age_10 income education_years if  turnout_propensity_pre~=.



**************
**************
*Evidence for Claim Made in the Text: 
*...85.2 percent of respondents reported always voting in recent elections.
**************	
**************
tab turnout_propensity_pre if sat_dem_post ~=. & age_10 ~=. & income ~=. & education_years ~=. & gender_cat ~=. & election_2022 ~=. 


**************
**************
*Evidence for Claim Made in the Text: 
*For nonvoters, the treatment effect is not statistically different from zero (two-sided p-value = 0.830).
*For routine voters, the treatment effect is negative and precisely estimated (about −0.59 units, with
*a two-sided p-value of 0.013). However, the two conditional treatment effects are not statistically
*different from one another (two-sided p-value = 0.977). 
**************	
**************
reg sat_dem_post i.election_2022##i.turnout_propensity_pre i.gender age_10 income education_years 
margins, dydx(election_2022) at(turnout_propensity_pre = (1 4)) post  level(90)
est store election_2022_turnout
test _b[1.election_2022:1bn._at] =  _b[1.election_2022:2._at]




********************************************************
********************************************************
********************************************************
*Section 11: Covariate Balance in Study 3 and the Survey Experiment in Brazil
********************************************************
********************************************************
********************************************************



**************
**************
*Open the Study 3 Dataset
**************
**************
use "Study 3.dta", clear


**************
**************
*Figure SM18
**************
**************

*Put covariates on a 0-1 scale
sum age 
gen age_01 = ((age - r(min))/(r(max) - r(min))) 

sum education_level
gen educ_level_01 =  ((education_level - r(min))/(r(max) - r(min))) 

sum income
gen income_01 = ((income - r(min))/(r(max) - r(min))) 



*create a series of copies of the treatment variable graph labeling purposes
gen election_2023_fem =  election_2023
gen election_2023_age =  election_2023
gen election_2023_edu =  election_2023
gen election_2023_inc =  election_2023



reg woman i.election_2023_fem if  turnout_propensity_pre ~=.
margins, dydx(election_2023_fem) post  level(90)
est store female

reg age_01 i.election_2023_age if  turnout_propensity_pre ~=.
margins, dydx(election_2023_age) post  level(90)
est store age_01

reg educ_level_01 i.election_2023_edu if  turnout_propensity_pre ~=.
margins, dydx(election_2023_edu) post  level(90)
est store educ_level_01

reg income_01 i.election_2023_inc if  turnout_propensity_pre ~=.
margins, dydx(election_2023_inc) post  level(90)
est store income_01


graph set window fontface "LMRoman10-Regular" 


coefplot 	///
			(female,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(age_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(educ_level_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(income_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
		, scheme(yale)  title("") levels(90)		///
		xline(0, lcolor(black*.8) lpattern(dash))  ylabel( , labsize(medsmall))  xlabel(-.15(.05).15, labsize(medsmall)) xscale(range(-.15 .15))  format(%9.2f) ///
		legend(off) ysize(4) xsize(10) scale(1.5) graphregion(color(white))	///
		xtitle("Estimated Ef`=uchar(14)'fect of Election Vignette" "on Mean Value of Covariate", size(medlarge)  margin(top))  ytitle("") 	///
		coeflabels(	1.election_2023_fem  = 		"Female"   ///
					1.election_2023_age  = 			"Age"   ///
					1.election_2023_edu  = 			"Education Level"   ///
					1.election_2023_inc  = 		"Income"   ///
					) 	
					
					


**************
**************
*Open the Brazil Experiment Dataset
**************
**************
use "Brazil_Experiment.dta", clear




**************
**************
*Figure SM19
**************
**************

*Put covariates on a 0-1 scale
sum age_10
gen age_01 = ((age - r(min))/(r(max) - r(min))) 

sum education_years
gen educ_01 =  ((education_years - r(min))/(r(max) - r(min))) 

sum income
gen income_01 = ((income - r(min))/(r(max) - r(min))) 



*create a series of copies of the treatment variable coefplot labeling purposes
gen election_2022_fem =  election_2022
gen election_2022_age =  election_2022
gen election_2022_edu =  election_2022
gen election_2022_inc =  election_2022



reg woman i.election_2022_fem if turnout_propensity_pre~=.
margins, dydx(election_2022_fem) post  level(90)
est store female

reg age_01 i.election_2022_age if turnout_propensity_pre~=.
margins, dydx(election_2022_age) post  level(90)
est store age_01

reg educ_01 i.election_2022_edu if turnout_propensity_pre~=.
margins, dydx(election_2022_edu) post  level(90)
est store educ_01

reg income_01 i.election_2022_inc if turnout_propensity_pre~=.
margins, dydx(election_2022_inc) post  level(90)
est store income_01



graph set window fontface "LMRoman10-Regular"


coefplot 	///
			(female,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(age_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(educ_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
			(income_01,  offset(0) msymbol(circle) msize(medlarge)  mcolor(black) ciopts(color(black*.8) lwidth(medium))) ///			
		, scheme(yale)  title("") levels(90)		///
		xline(0, lcolor(black*.8) lpattern(dash))  ylabel( , labsize(medsmall))  xlabel(-.15(.05).15, labsize(medsmall)) xscale(range(-.15 .15))  format(%9.2f) ///
		legend(off) ysize(4) xsize(10) scale(1.5) graphregion(color(white))	///
		xtitle("Estimated Ef`=uchar(14)'fect of Election Vignette" "on Mean Value of Covariate", size(medlarge)  margin(top))  ytitle("") 	///
		coeflabels(	1.election_2022_fem  = 		"Female"   ///
					1.election_2022_age  = 			"Age"   ///
					1.election_2022_edu  = 			"Years of Education"   ///
					1.election_2022_inc  = 		"Income"   ///
					) 		

